CHARTS

Family Integration Policy by Country

Bar Horizontal Ordered

Photo by Mitchel Lensink on Unsplash

Photo by Mitchel Lensink on Unsplash

[t]he family is the natural and fundamental group unit of society
and is entitled to protection by society and the State…
— The Universal Declaration of Human Rights


Ingest

country, region, and family integration policy scores

url_root <- "https://raw.githubusercontent.com/UN-AVT/kamino-source/main/sources/0-shared/data/"
url_file <- "family-integration-policy-by-country/family-integration-policy-by-country.csv"
url <- paste0(url_root, url_file)

df <- read.csv(url, header = TRUE, stringsAsFactors = TRUE)
df

Plot

with standard alpha order

theme_opts <- theme(
    text = element_text(family = "inconsolata", size = 16), 
    plot.title = element_text(color = "black", size = 16, face = "bold"),
    plot.subtitle = element_text(color = "black", size = 12),
    plot.caption = element_text(color = "#555555", size = 11),
    plot.margin = margin(.25, 1, .25, .25, "in"),
    plot.background = element_blank(),
    panel.border = element_blank(),
    panel.background = element_blank(),
    panel.grid.minor.x = element_blank(),
    panel.grid.major.x = element_blank(),
    panel.grid.minor.y = element_blank(),
    #panel.grid.major.y = element_blank(),
    axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1, face = "bold"),
    # axis.title.y=element_blank(),
    # axis.ticks.y=element_blank(),
    # axis.ticks.x=element_blank(),
    # axis.text.x=element_blank(),
    legend.position = "none"
)

v1 <- ggplot(df, aes(x=Country, y=Family.Integration.Policy.Average.Scores)) + 
  geom_bar(stat="identity", fill="#88b88a") +
  scale_y_continuous(breaks = seq(0, 100, 10), limits = c(0, 100)) +
  coord_cartesian(clip="off") +
  labs(title = "FAMILY INTEGRATION POLICY AVERAGE SCORES BY COUNTRY, 2014", x = NULL, y = "Family integration policy average scores") +
  theme_bw() +
  theme_opts

girafe(ggobj = v1, width_svg = 16, height_svg = 9,
       options = list(opts_sizing(rescale = TRUE, width = 0.8)))

Plot

ordered, ascending

v2 <- ggplot(df, aes(x=reorder(Country,Family.Integration.Policy.Average.Scores), y=Family.Integration.Policy.Average.Scores)) + 
  geom_bar(stat="identity", fill="#88b88a") +
  scale_y_continuous(breaks = seq(0, 100, 10), limits = c(0, 100)) +
  coord_cartesian(clip="off") +
  labs(title = "FAMILY INTEGRATION POLICY AVERAGE SCORES BY COUNTRY, 2014", x = NULL, y = "Family integration policy average scores") +
  theme_bw() +
  theme_opts

girafe(ggobj = v2, width_svg = 16, height_svg = 9,
       options = list(opts_sizing(rescale = TRUE, width = 0.8)))

Plot

ordered, descending

v3 <- ggplot(df, aes(x=reorder(Country,-Family.Integration.Policy.Average.Scores), y=Family.Integration.Policy.Average.Scores)) + 
  geom_bar(stat="identity", fill="#88b88a") +
  scale_y_continuous(breaks = seq(0, 100, 10), limits = c(0, 100)) +
  coord_cartesian(clip="off") +
  labs(title = "FAMILY INTEGRATION POLICY AVERAGE SCORES BY COUNTRY, 2014", x = NULL, y = "Family integration policy average scores") +
  theme_bw() +
  theme_opts

girafe(ggobj = v3, width_svg = 16, height_svg = 9,
       options = list(opts_sizing(rescale = TRUE, width = 0.8)))

References

The citations and data sources used for this case

  • Narrative and Data Source, UN Women, Progress of the world’s women, GO